package com.me.prototype.deepclone;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 使用重写clone方法实现深拷贝
 * 使用序列化来实现深拷贝
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class DeepCloneableTarget implements Serializable,Cloneable {
    private String cloneName;
    private String cloneClass;

    @Override
    protected Object clone() throws CloneNotSupportedException{
        return super.clone();
    }

}
